package com.sls.game.dao.enfu.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.sls.game.dao.enfu.EnfuAccountTypeDAO;
import com.sls.game.dao.impl.SuperDAO;
import com.sls.game.pojo.enfu.EnfuAccountTypeInfo;

/**
 * 
 * @description EnfuAccountTypeDAO
 * @author Wangxuegang
 * @date 2013-4-28
 */
@Repository("enfuAccountTypeDAO")
public class EnfuAccountTypeDAOImpl extends SuperDAO<EnfuAccountTypeInfo>
		implements EnfuAccountTypeDAO {

	/**
	 * 记录插入
	 * 
	 * @param enfuAccountTypeInfo
	 */
	@Override
	public void insert(EnfuAccountTypeInfo enfuAccountTypeInfo) {
		this.getSqlSession().insert("mybatis.xml.EnfuAccountTypeMapper.insert",
				enfuAccountTypeInfo);
	}

	/**
	 * 查询账户类型信息
	 * 
	 * @param enfuAccountTypeInfo
	 * @return
	 */
	@Override
	public String queryAccountType(EnfuAccountTypeInfo enfuAccountTypeInfo) {
		String hidAccountType = this.getSqlSession().selectOne(
				"mybatis.xml.EnfuAccountTypeMapper.queryAccountType",
				enfuAccountTypeInfo);
		return hidAccountType;
	}

	/**
	 * @param enfuAccountTypeInfo
	 * @return
	 */
	@Override
	public List<EnfuAccountTypeInfo> queryOneOrMoreAccount(
			EnfuAccountTypeInfo enfuAccountTypeInfo) {
		List<EnfuAccountTypeInfo> list = this.getSqlSession().selectList(
				"mybatis.xml.EnfuAccountTypeMapper.queryOneOrMoreAccount",
				enfuAccountTypeInfo);
		return list;
	}

	/**
	 * 删除记录
	 * 
	 * @param id
	 */
	@Override
	public void deleteById(String id) {
		this.getSqlSession().delete(
				"mybatis.xml.EnfuAccountTypeMapper.deleteById", id);
	}

}
